﻿
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/site.master" CodeBehind="search_search.aspx.cs"
    Inherits="Icst.Leaflike.Web.search.search" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="main">
    <!--#include file="search_head.htm"--> 

    <form id="Form1" runat="server">
    <asp:ScriptManager ID="sc" runat="server" AsyncPostBackTimeout="36000" EnablePageMethods="true" />
    <div style="margin-top:10px; margin-bottom:10px">
        <asp:Panel ID="tipsPanel" runat="server">
            <div id="tipsTextBox" runat="server"/>
        </asp:Panel>
        <asp:Panel ID="searchResultPanel" runat="server">
            <asp:Panel ID="resultPanel" runat="server">
            <table cellpadding="0" cellspacing="0">
            <tr>
                <td valign="top" style="width:150px">
                    <div class="sw_menu"">
                        <h2>搜索</h2>
                        <ul>
                            <li /><li /><li /><li />
                            <li><a href="search_default.htm"><strong>重新搜索</strong></a></li>
                        </ul>
                        
                     </div>
                </td>
                <td valign="top">
                 <% 
                     if (_results != null){
                     foreach (Icst.Leaflike.Data.tree_searchResult r in _results)
               { %>
                   <table cellspacing="0" cellpadding="2">
                        <tr>
                            <td class="thumbnail" valign="top">
                                <a href='<%="trees/"+r.imagelink %>' mon="a=5&pn=3" target="_blank"><img src='<%="thumbnail.htm?thumbnail=true&name="+r.imagelink %>' border="1" /></a>
                            </td>
                            <td class="text" valign="top">
                                <a href='<%="tree.htm?id="+r.tree_no %>' mon="a=5&pn=3" target="_blank">
                                
                                <%if (r.score < Icst.Leaflike.AppConfig.searchthrehold)
                                  { %>
                                    <span><%=r.tree_name%></span>
                                    <%} %>
                                    <%else{ %>
                                    <span style="background:Yellow"><b><%=r.tree_name%></b></span>
                                    <%} %>
                                </a>
                                <br />
                                <font size="-1"><%=this.Server.HtmlEncode(r.description)%></font>
                                <br />
                                <a href='<%="search_relevant.htm?tree="+r.tree_no %>' mon="a=5&pn=3" target="_blank"><span><b>相关</b></span></a>
                                <a href='<%="search_similar.htm?tree="+r.tree_no %>' mon="a=5&pn=3" target="_blank"><span><b>相似</b></span></a>
                                <%if (r.Links.Count > 0)
                                  { %>
                                <br />
                                <%foreach (var link in r.Links)
                                  {%>
                                  <a href='<%=link.Value %>' mon="a=5&pn=3" target="_blank"><span><b><%=link.Key%></b></span></a>
                                <%} %>
                                <%} %>
                            </td>
                        </tr>
                    </table>
                <% }}%>
                <asp:Paginator runat="server"  ID="paginator" ShowGotoBox="false"  ShowFirstPage="false" ShowLastPage="false" ShowPageIndexList="false" 
                 PageSize="10" PagerTagName="span" PagerCssClass="num_btn" NumericButtonCount="10" CustomizeTextAlign="Left" CssClass="pager" PageListCssClass="page_list" />
                 </td></tr></table>
            </asp:Panel>
            <asp:Panel ID="emptyPanel" runat="server" style="text-align:center;">
                <p class="header">
                    <span>哎呀!!! 怎么没找到啊~~~~~~~~~~</span>
                    <br/>
                    <p style="text-align:left"><a href="search_default.htm" style="font-size:larger">恩，再试一下</a></p>                   
                </p>
            </asp:Panel>
        </asp:Panel>
    </div>
    <ul class="menutabs">
        <li><asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="search_flower.htm" Text="上一步"/></li>
        <li><asp:HyperLink ID="HyperLink3" runat="server" Text="搜索>>" NavigateUrl="search_search.htm?s=1"/></li>
    </ul>
    </form>
</asp:Content>
